<html>
<head>
<meta charset="UTF-8">

<title>TechOak</title>

<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
@media print {
.table_option tr {
	background-color: #B4DDFA !important; 
	-webkit-print-color-adjust: exact; 
	}
}
</style>	

</head>

<body>


<table cellspacing="0" cellpadding="0" border="0" align="center">
	<tr>

	<td width="100%" valign="top">
	
	<table cellspacing="0" cellpadding="0" border="0">
		<tr>
		  <td width="100%">
			
			<table class="table_scale" cellspacing="0" cellpadding="0" border="0" width="600">
			  <tr>
				<td class="block-row full" width="200">
					<div class="center" style="font-family: Arial, Helvetica, sans-serif;">
					   <span style="position: relative; font-size:25px; font-weight:bold; "> TechOak</span>
					   <br>
					   
					   <span style="font-size:18px;">
					    45 Dell ST <br>
						Sleepy Hollow, NY 10591
						</span>
					</div>
				</td>
			
				<td class="block-row full" width="200">
					<div class="center" style="font-family: Arial, Helvetica, sans-serif;">
						<span style="font-size:18px;">
						(877) 805-6052 <br>
						support@techoak.com <br>
						<?php echo SITEURL;?>
						</span>
					</div>
				
				</td>
				
				<td class="block-row full" width="200">
					<div class="center">
<img src = "<?php echo TEMPLATE; ?>images/logo.png" height="75">					
					</div>
				</td>		

			  </tr>
			</table>
			
		  </td>
		</tr>
	</table>
		
	</td>   
	</tr>

</table>   

 
<table cellspacing="0" cellpadding="0" border="0" align="center">

	<tr>
		<td align="center">
		
			<table cellspacing="0" cellpadding="0" align="center" width="600">
			  <tr>
				<td>
				  <div class="general-title" style="color:#1E74A1; font-family: Arial, Helvetica, sans-serif; font-size:14px;">
				  <h1>SALES RECEIPT</h1>
				  </div>
				</td>
				
			  </tr>
			
			</table>
		
		<table cellspacing="0" cellpadding="0" align="center">
			<tr>
				<td align="center">
					
				  <table cellspacing="0" cellpadding="0" width="600" border="0">
					  <tr>
						<td width="100%">
						
							<table class="table_scale" cellspacing="0" cellpadding="0" border="0" width="600">
							  <tr>
								<td class="block-row full" width="300">
								  <div class="center" style="font-family: Arial, Helvetica, sans-serif;">
									<span style="font-size:18px;">
				BILL TO <br>
				<?php echo $sessionArray['user_prefix']." ".$sessionArray['user_firstname']." ".$sessionArray['user_lastname'] ?><br>
                                <?php echo $sessionArray['user_address'] ?><br>
				<?php echo $sessionArray['user_city'].", ".$sessionArray['user_state'].", ".$sessionArray['user_zipcode'] ?><br>
				<?php echo $sessionArray['user_country'];?> <br>
				
									</span>
								  </div>
								</td>
								
								<td class="block-row full" width="300">
									<div class="center" style="font-family: Arial, Helvetica, sans-serif;">
									<span style="font-size:18px; float:right;">
									SALES NO. <?php  $saleid = str_replace("{-","",$sessionArray['qb_sale_docnumber']);
				echo str_replace("}","",$saleid);
				?> <br>
				DATE <?php  echo date('m/d/Y',strtotime($sessionArray['createDate']));?>
									</span>
									</div>
								</td>
							  </tr>								  
							</table>
	<hr style="border-bottom:3px solid #1E74A1;">
						</td>
					</tr>
				  </table>
			
				</td>
	
			</tr>  <!-- end container -->
		</table>	

	<table cellspacing="0" cellpadding="0" border="0" align="center">
	 <tr>

	  <td width="100%" valign="left">
	
	<table cellspacing="0" cellpadding="0" border="0">
		<tr>
		  <td width="100%">
			
			<table class="table_scale" cellspacing="0" cellpadding="0" border="0" width="600">
			  <tr>
				<td class="block-row full">
					<div class="left" style="font-family: Arial, Helvetica, sans-serif;">
					   <span style="font-size:18px;">
					   PMT METHOD<br>
					   <?php if($sessionArray['payment_gateway'] == 'paypal'):
                    echo 'Paypal';
                else:
                    echo ucfirst($sessionArray['payment_method']);//'Credit Card';
                endif; ?></span>
					</div>
				</td>
			  </tr>
			</table>
			
		  </td>
		</tr>
	</table>
	   </td>
	 </tr>
	 
	</table> 
	</tr>
</table>
 
<table cellspacing="0" cellpadding="0" width="600" align="center">
	<tr>
		<td width="100%" height="50">
		</td>
	</tr>
</table>
 
<table cellspacing="0" cellpadding="0" border="0" align="center">
  <tr>
	<td width="100%" valign="top">
		<table cellspacing="0" cellpadding="0" border="0">
		  <tr>
			<td width="100%">
				
				<table class="table_option" cellspacing="0" cellpadding="5" border="0" align="center" width="600" style="min-height:auto;">
				  <tr style="position:relative; background-color: #B4DDFA !important; text-align:left; height:30px; font-family:  Arial, Helvetica, sans-serif;">
					
				
					<th style="color:#21679A;">ACTIVITY</th>
					<th style="color:#21679A;">DATE</th>
					<th style="color:#21679A;">QTY</th>
					<th style="color:#21679A;">RATE</th>
					<th style="color:#21679A;">AMOUNT</th>
				  </tr>
				  
				  <?php 
				$total_amount = '';
				foreach($AllorderArray as $key =>$value): 
						$total_amount += $value['or_price'];
				?>
				<tr>
					<td style="font-weight:bold; font-size:20px;"><?php echo $value['prd_name']. " ( ".$value['prd_code'] ." )" ?></td>
					<td><?php echo date('m/d/Y',strtotime($value['or_createdate'])); ?></td>
					<td><?php echo  $value['or_prd_qty']; ?></td>
					<td>$ <?php echo $value['or_prd_price']; ?></td>
					<td>$ <?php echo $value['or_price']; ?></td>
				</tr>
				
				 <?php endforeach;?> 
				<?php if($value['pt_coupon_code'] != ''):?>
					<tr>
						<td style="font-weight:bold; font-size:20px;"><?php echo "Discount Code - ".$value['pt_coupon_code'] ?></td>
						<td><?php echo date('m/d/Y',strtotime($value['or_createdate'])); ?></td>
						<td><?php echo  $value['pt_coupon_qty']; ?></td>
						<td> - $<?php echo $value['pt_coupon_price']; ?></td>
						<td> - $<?php echo $value['pt_coupon_qty'] * $value['pt_coupon_price']; ?></td>
					</tr>
				<?php  endif;?>
								
				</table>
				
			</td>
		  </tr>
		</table>
			
	</td>
  </tr>  <!-- end container -->
 
</table>
 
<table cellspacing="0" cellpadding="0" border="0" align="center" width="600" style="border-top:2px dotted #3300CC; margin-top:5%;">
	<tr>
		<td width="100%" valign="top">
		
			<table cellspacing="0" cellpadding="0" border="0">
			  <tr>
			  <td>Total includes all applicable taxes.</td>
			  </tr>
			  <tr>
				<td width="100%">
					<table class="table_scale" cellspacing="0" cellpadding="0" width="600" border="0">
					  <tr>
						<td class="full_box" width="400">
							<div class="right" style="font-family: Arial, Helvetica, sans-serif;">
							  <span style="float:right; font-size:17px;">
								TOTAL
							  </span>
							</div>
						</td>
						
						<td class="full_box" width="200">
							<div class="right" style="font-family: Arial, Helvetica, sans-serif;">
							  <span style="float:right; font-size:19px;">
								$ <?php  $final_Amt = $total_amount - ($value['pt_coupon_qty'] * $value['pt_coupon_price']);
                echo number_format($final_Amt,2);?>
							  </span>
							</div>
						</td>
					  </tr>
					</table>
				</td>
			  </tr>
			</table>
		
		</td>
	</tr>
</table>

<table cellspacing="0" cellpadding="0" width="600" align="center">
	<tr>
		<td width="100%" height="40">
		</td>
	</tr>
</table>

<table cellspacing="0" cellpadding="0" border="0" align="center" width="600">
	<tr>
		<td width="100%" valign="top">
			<table cellspacing="0" cellpadding="0" border="0">
			  <tr>
				<td width="100%">
				
					<table cellspacing="0" cellpadding="0" width="0" align="left" border="0">
					  <tr>
						<td class="center" style="font-family:Arial, Helvetica, sans-serif; font-size:18px; text-align:left;">
							<span>
							Thank you for your business <br>
							<?php echo SITEURL;?>terms-and-conditions
							</span>
						</td>
					  </tr>
					</table>
		
				</td>
			  </tr>
			</table>
		</td>
	</tr>
</table>
 
</body>
</html>